package com.leyou.sh.trade.config;

import com.leyou.sh.auth.dto.UserDetail;
import com.leyou.sh.auth.utils.UserContext;
import org.springframework.stereotype.Component;

/**
 * @author balisong_fcs
 * @date 2021/1/16 20:29
 * @desc
 */
@Component
public class BeanName {
  public String getCollName() {
      UserDetail user = UserContext.getUser();
      if (user == null) {
          return "";
      } else {
          return "carts" + ((user.getId()) % 100);
      }
  }
}
